<template>
  <div class="edit-address-container">
    <h2>Edit Shipping Address</h2>
    <form @submit.prevent="handleSubmit">
      <div class="form-group">
        <label for="addressInput">Address:</label>
        <input type="text" v-model="address" id="addressInput" />
      </div>
      <!-- 其他表单字段，如姓名、电话等 -->
      <div class="map-box box-4b3">
        <Map class="map-center" @clickPoint="clickPoint"></Map>
      </div>
    </form>
  </div>
</template>

<script>
export default {
  components: {
    Map: () => {
      return import('@/components/onlyMap.vue');
    },
  },
  data() {
    return {
      address: '',
      map: null,
      geocoder: null,
      marker: null,

      hasUserId: true,
    };
  },

  methods: {
    clickPoint: function() {
      console.log('clickPoint');
      if (this.hasUserId) {
        this.$router.push('/register');
      } else {
        this.$router.push('/goodsList');
      }
    },
  },
  mounted() {},
};
// 地图-注册-介绍视频-信息-充值-选出生点-回首页地图
</script>

<style scoped>
.map-box {
  position: relative;
}
.map-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
</style>
